<template>

  <table>
    <thead>
      <tr>
        <th>班级</th>
        <th>课程</th>
        <th>考勤列表</th>
        <th>学生考勤排行</th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="item in list">
        <td>{{ item.clazzName }}</td>
        <td>{{ item.courseName }}</td>
        <td><a href="">查看</a></td>
        <td><a href="">查看</a></td>

      </tr>
    </tbody>
  </table>

</template>

<script>
import { mapActions, mapState } from 'pinia'
import { useTeacherStore } from '../../stores/teacher'

export default {
  inject: ['axios'],
  methods: { ...mapActions(useTeacherStore, ['fetchTeacher', 'fetchAllCoursesWithAllClazzesByTeacherId']) },


  async mounted() {
    this.list = await this.fetchAllCoursesWithAllClazzesByTeacherId();
  },
  data() {
    return {
      list: []//所授全部课程和班级的组合[{courseId:1,courseName:'算法',clazzId:1,clazzName:'软件2202'}]
    }
  }

}

</script>


<style>
@media (min-width: 1024px) {
  .about {
    min-height: 100vh;
    display: flex;
    align-items: center;
  }
}

tbody,
tr,
td {
  border-width: 1px;
}
</style>
